package cn.cqie.frame.mapper;

import cn.cqie.frame.bo.query.QueryClazzCourseTeacherBo;
import cn.cqie.frame.bo.query.QueryUserListReqBo;
import cn.cqie.frame.entity.ClazzCourseTeacher;
import cn.cqie.frame.vo.ClazzCourseTeacherVo;
import cn.cqie.frame.vo.UserVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author XYHL
 * @since 2021-10-07
 */
@Mapper
public interface ClazzCourseTeacherMapper extends BaseMapper<ClazzCourseTeacher> {
    @Select("SELECT  clazz_course_teacher.id,clazzId,clazz.name as clazzName, teacherId,emp.`name` as teacherName,courseId,course.`name` as courseName\n" +
            "FROM " +
            " clazz_course_teacher" +
            "  JOIN  clazz on clazz.id = clazz_course_teacher.clazzId\n" +
            "  JOIN  emp   on emp.id = clazz_course_teacher.teacherId\n" +
            "  JOIN  course on course.id = clazz_course_teacher.courseId")
    List<ClazzCourseTeacherVo> listSchedule(QueryClazzCourseTeacherBo bo);

}
